/*
    jdbc:firebirdsql:localhost/3050:C:/Bancos/SISDB.GDB
    SYSDBA
    masterkey

    this.setLocationRelativeTo(this);  //Centralizacao da Tela {Colocado abaixo de initComponents()}
 */
package util;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.AnnotationConfiguration;

/**
 *
 * @author Oziel
 */
public class HibernateUtil {

    private static SessionFactory SESSIONFACTORY;
    static {
        SESSIONFACTORY = new AnnotationConfiguration().configure("hibernate.cfg.xml").buildSessionFactory();

    }

    public static Session getSession() {
        return SESSIONFACTORY.openSession();
    }
}
